/*    */ package com.newcrm.webapi.sub;
/*    */ 
/*    */ import com.newcrm.bean.User;
/*    */ import com.newcrm.db.CustomerFieldManager;
/*    */ import com.newcrm.exception.NotFoundException;
/*    */ import com.newcrm.webapi.AbstractAction;
/*    */ import com.newcrm.webapi.AbstractHttpServlet;
/*    */ import java.io.IOException;
/*    */ import java.util.List;
/*    */ import javax.servlet.RequestDispatcher;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.apache.log4j.Logger;
/*    */ 
/*    */ public class ListCustomerFiled extends AbstractAction
/*    */ {
/* 21 */   private static Logger logger = Logger.getLogger(ListCustomerFiled.class
/* 22 */     .getName());
/*    */ 
/*    */   public ListCustomerFiled(AbstractHttpServlet servlet)
/*    */   {
/* 25 */     super(servlet);
/*    */   }
/*    */ 
/*    */   public void parse(HttpServletRequest request, HttpServletResponse response)
/*    */     throws IOException, ServletException, NotFoundException
/*    */   {
/* 31 */     User user = super.getLoginUser(request);
/*    */ 
/* 33 */     CustomerFieldManager manager = new CustomerFieldManager();
/*    */     try {
/* 35 */       List result = manager.listAll(user.companyId);
/* 36 */       request.setAttribute("customerfield", result);
/* 37 */       request.getRequestDispatcher("/customerFields.jsp").forward(
/* 38 */         request, response);
/*    */     } catch (Exception e) {
/* 40 */       logger.warn("get customer filed failed", e);
/* 41 */       throw new NotFoundException();
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.webapi.sub.ListCustomerFiled
 * JD-Core Version:    0.6.1
 */